1. Field of the Invention
The present invention relates to selective IDE command transfer, and more particularly to a method and apparatus for inhibiting a selected IDE command (such as a write command) sent from a host computer from reaching a data storage device (such as a hard disk drive).
2. Description of Related Art
Host computers utilize data storage devices to provide increased storage capabilities to fulfill user demands. Hard disk drives are popular data storage devices. A hard disk drive generally includes several disks that each contain concentric tracks on both of their primary surfaces for storing data, a spin motor that rotates the disks about a central axis at a substantially constant rate, heads that read data from and write data to the disks (with one head per disk surface), an actuator assembly that radially positions the heads above the desired tracks, and circuitry such as a preamplifier, read channel and controller that transfers data between the heads and the host computer.
The host computer delivers access requests to the hard disk drive whenever the host computer desires to store or retrieve data. To perform the access request, the hard disk drive first positions the heads above the desired tracks of the rotating disks specified by the access request. Once the heads are properly positioned, the requested data transfer takes place. Writing is performed by delivering a write signal with polarity-switching current to a selected head while the head is positioned above the desired track, and the head induces magnetically polarized transitions into the desired track that are representative of the data being stored. Reading is performed by the head sensing the magnetically polarized transitions on the track As the disk spins below the head, the magnetically polarized transitions induce a varying magnetic field in the head which the head converts into an analog read signal that is amplified by the preamplifier, converted into a digital signal and processed by the read channel, and provided to the host computer.
The hard disk drive communicates with the host computer by an interface (or bus). The interface can be defined in many layers, including the cable or connector, the protocol, the peripheral device, and the commands. Although the ST412/506 and Enhanced Small Device Interface (ESDI) interfaces were widely used for earlier generations of hard disk drives, as more electronics (such as the formatter, data buffer and controller) have been integrated into more modern and intelligent drives, these earlier interfaces have been replaced by other interfaces. The two most popular modern hard disk drive interfaces are Integrated Drive Electronics (IDE) and Small Computer Systems Interface (SCSI). The IDE interface is often referred to as the AT-Attachment (ATA) since the integrated electronics within the drive emulate the hard disk controller of an IBM AT personal computer.
The IDE and SCSI interfaces differ in many respects. For instance, IDE permits the hard disk drive to integrate more electronics than SCSI. IDE typically links the host computer to one or two hard disk drives and/or CD-ROMs, whereas SCSI can link the host computer to seven or more devices including hard disk drives, tape drives, printers, scanners, CD-ROMs, optical storage and WORM drives, processors, and communication devices. IDE employs a 40-wire ribbon cable, whereas SCSI employs a 50-wire ribbon cable for an 8-bit data bus that links the host computer to seven devices. Further, Wide SCSI and Ultra SCSI implementations with 16- and 32-bit data buses, respectively, use wider cables that link the host computer to 15 and 31 devices, respectively. IDE is preferred over SCSI for low cost and ease of use, whereas SCSI offers more speed and capability than IDE and is often the choice over IDE in high-end PCs and workstations.
A critical factor in the mass production of computer systems is the associated production costs of the bus and related interface circuitry. Generally, the more signals a bus has and the more sophisticated the associated control logic, the more costly it becomes. The success of IDE and SCSI can be attributed to the availability of economical bus interface components and the fact that a simple ribbon cable can be used to interconnect the devices. However, the cost of IDE hard disk drives typically is significantly less than the cost of SCSI hard disk drives. For example, IDE hard disk drives can cost on the order of 50% less than SCSI hard disk drives with comparable performance (storage capacity, data transfer rate, average seek time, etc.). Moreover, IDE controllers are usually integrated on the motherboard of the host computer, whereas SCSI controllers are usually separate cards that must be purchased separately from the host computer and installed in one of the slots in the host computer. Thus, another disadvantage of SCSI hard disk drives as compared to IDE hard disk drives is the need to purchase an SCSI controller and to consume a slot in the host computer that might otherwise be used for another peripheral device.
In some applications, the host computer should be prevented from performing certain operations on the hard disk drive. For example, in gaming machines such as casino slot machines, it may be desirable to prevent the host computer from writing to the hard disk drive in order to prevent unauthorized changes to programs and data stored on the hard disk drive. As more gaming machines move towards personal computer based platforms, a convenient, cost-effective technique to write-inhibit the hard disk drive would be highly desirable.
SCSI hard disk drives typically have write-inhibit capability, however, as mentioned above, SCSI hard disk drives typically are significantly more expensive than IDE hard disk drives and require a slot in the host computer. IDE hard disk drives with write-protect jumpers have been reported in the literature. For instance, the Fujitsu M261xT IDE hard disk drives with write-protect jumpers have been discontinued, and the Bitmicro Networks E-Disk ATX35 solid state IDE hard disk drive with a write-protect jumper is prohibitively expensive. Unfortunately, the vast majority of IDE hard disk drives do not have write-protect jumpers or any other hardware-implemented write-inhibit capability. In another approach, U.S. Pat. No. 5,126,890 to Wade et al. discloses a security module for a removable hard disk drive, the module has a lockable hardware write protection feature in which a four position lock can be set to generate a control signal, and the hard disk drive becomes write protected in response to the control signal.
Furthermore, merely blocking a write command sent from a host computer along an IDE bus so that it fails to reach the hard disk drive is not a viable approach since this may leave the drive and the IDE bus in a non-deterministic state that requires user intervention.
Accordingly, none of the existing solutions provides a satisfactory approach to preventing the host computer from sending selected commands to a data storage device while allowing the manufacturer to choose from a wide variety of data storage devices. More particularly, none of the existing solutions provides a satisfactory technique for inhibiting a host computer from writing to an IDE hard disk drive while retaining the flexibility of selecting whatever IDE hard disk drive best suits the particular application.
The present invention solves the above and other problems, and thereby advances the useful arts, by providing an interface circuit that replaces a selected IDE command received from the host computer with an invalid command and routes the invalid command to a data storage device. Preferably, the interface circuit is placed between an IDE port of the host computer and an IDE port of a hard disk drive. In this manner, the interface circuit provides a convenient, cost-effective technique for inhibiting a selected IDE command sent by the host computer from reaching the data storage device. The interface circuit can be used with any IDE data storage device. Moreover, by replacing the inhibited command with an invalid command, rather than merely blocking the inhibited command, the data storage device can provide an error message rather than leaving the data storage device and IDE bus in a non-deterministic state that might require user intervention.
Generally speaking, the interface circuit includes a first port for communicating with an IDE interface of a host computer, a second port for communicating with an IDE interface of a data storage device, and a control circuit that sends an invalid command rather than a selected IDE command to the second port in response to receiving the selected IDE command at the first port.
Preferably, the data storage device is a hard disk drive, the selected IDE command is a write command, and the invalid command is a reserved IDE command. It is also preferred that the interface circuit routes any communication other than the selected command(s) received from the host computer to the data storage device, thereby permitting the host computer to read an error message that the data storage device generates in response to the invalid command.
In one embodiment, the interface circuit includes an external device that permits a user to enable and disable the command-inhibit function of the control circuit. When the command-inhibit function is enabled, the control circuit sends the invalid command rather than the selected IDE command to the second port in response to the selected IDE command being received at the first port. When the command-inhibit function is disabled, the control circuit sends the selected IDE command rather than the invalid command to the second port in response to the selected IDE command being received at the first port. The external device can be a mechanical switch or a pair of jumper pins.
In another embodiment, the interface circuit includes a printed circuit board, the first port is a 40-pin male connector that extends from a first major surface of the printed circuit board and plugs into an IDE ribbon cable connected to the host computer, and the second port is a 40-pin female connector that extends from a second major surface of the printed circuit board and plugs into the IDE port of the hard disk drive.
The present invention also includes a method of selectively transferring IDE commands between a host computer and a data storage device. In one embodiment, the method includes sending an IDE command from the host computer to a first IDE bus not connected to the data storage device, determining that the data storage device should not receive the IDE command, sending an invalid command rather than the IDE command to a second IDE bus connected to the data storage device, and sending an error message that the data storage device provides in response to the invalid command from the data storage device to the host computer via the first and second IDE buses. This not only prevents the host computer from sending the command to the data storage device, but also notifies the host computer that the desired operation has failed.
The method may also include periodically sending another IDE command from the host computer to the data storage device via the first and second buses to determine whether the data storage device received the IDE command that it should not have received.
The invention is particularly well-suited for preventing a host computer from writing to an IDE hard disk drive in a gaming machine such as a slot machine.
It is therefore an object of the present invention to provide an interface circuit that inhibits a selected IDE command sent by a host computer from reaching a data storage device.
It is another object of the present invention to provide an interface circuit that enables a data storage device to provide an error message to a host computer when a selected IDE command sent by the host computer has not reached the data storage device.
It is a further object of the present invention to provide a convenient, cost-effective technique for assuring that a host computer cannot make unauthorized changes to programs and data stored on an IDE data storage device.
These and other objects, features and advantages of the invention will be further described and more readily apparent from a review of the detailed description of the preferred embodiments which follows.